package com.sky.mapper.admin;


import com.github.pagehelper.Page;
import com.sky.aop.AutoFill;
import com.sky.enumeration.OperationType;
import com.sky.pojo.Employee;
import com.sky.result.Result;
import org.apache.ibatis.annotations.*;



public interface EmployeeMapper {

    /**
     * 根据用户名查询员工
     * @param username
     * @return
     */
    @Select("select * from employee where username = #{username}")
    Employee getByUsername(String username);





    @AutoFill(OperationType.INSERT)
    void save(Employee employee);

    Page<Employee> list(String name);

    @AutoFill(OperationType.UPDATE)
    void update(Employee employee);

    Employee getById(int id);


    void operate(Long id, Integer status);
}
